<template>
  <!-- 搜索 -->
  <div class="search">
    <el-autocomplete
      style="width: 100%;"
      class="inline-input"
      v-model="searchContent"
      :trigger-on-focus="false"
      :fetch-suggestions="searchSuggest()"
      placeholder="请输入您感兴趣的内容"
      @select="select()"
    >
      <i slot="suffix" @click="search" class="el-input__icon el-icon-search" style="cursor:pointer"></i>
    </el-autocomplete>
  </div>
</template>

<script>
export default {
    data() {
        return {
            searchContent: ''
        }
    },
    methods: {
        // 执行搜索操作
        search() {},
        // 搜索建议
        searchSuggest() {},
        select() {}
    },
}
</script>

<style lang="less" scoped>
.el-input {
  border: none;
}
</style>
